//@ts-ignore
import axios from '../utils/axios';
export default {
  addUser(params:object):Promise<any>{
    return axios.post('/user/register', params);
  },
  loginUser(params:object):Promise<any>{
    return axios.post('/user/login', params);
  },
  fixUser(id:number, params:object):Promise<any>{
    return axios.put('/user/'+id, params);
  },
  delUser(id:number):Promise<any>{
    return axios.delete('/user/'+id);
  },
  infoUser(id:number):Promise<any>{
    return axios.get('/user/'+id);
  },
  pageUser(params:object):Promise<{list:Array<any>,page:{size:number,page:number,count:number}}>{
    return axios.get('/user',{ params });
  }
}